home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / boosters.arc / BOXUL.PAS < prev    next >
Pascal/Delphi Source File  |  1980-01-01  |  2KB  |  54 lines

  1. { ---------------------
  2.   Upper Left Box
  3.   --------------------- }
  4. Procedure BOXUL ( Start_Col, Start_Row,
  5.                   End_Col,   End_Row,   Style   : Integer;
  6.                   Attribute  : Byte);
  7.  
  8. Var
  9.    Ver_Adj, Hor_Adj, Num_Col, Num_Row : Integer;
  10.  
  11. Const
  12.                                   { DOWN  LL  OVER  LR   UR   UL }
  13.    s : array[1..4,1..6] of char = ((#179,#192,#196,#217,#191,#218),
  14.                                    (#186,#200,#205,#188,#187,#201),
  15.                                    (#186,#211,#196,#189,#183,#214),
  16.                                    (#179,#212,#205,#190,#184,#213));
  17.  
  18. begin
  19.    if (style < 1) or (style > 4) then
  20.       style := 1;
  21.    Num_Col := End_Col - Start_Col + 1;
  22.    Num_Row := End_Row - Start_Row + 1;
  23.    if Num_Col <= 2 then
  24.       Num_Col := 3;
  25.    if Num_Row <= 2 then
  26.       Num_Row := 3;
  27.    Ver_Adj := Num_Row - 2;
  28.    Hor_Adj := Num_Col - 2;
  29.  
  30.    PUTSTR ( V, s[style,6],
  31.                Start_Col, Start_Row, Attribute);             { UL Corner  }
  32.  
  33.    PUTSTR ( V, COPIES( s[style,1], Ver_Adj),
  34.                Start_Col,  Start_Row + 1, Attribute);        { Left Side  }
  35.  
  36.    PUTSTR ( V, s[style,2],
  37.                Start_Col, End_Row, Attribute);               { LL Corner  }
  38.  
  39.    PUTSTR ( H, COPIES( s[style,3], Hor_Adj),
  40.                Start_Col + 1, End_Row, Attribute);           { Bottom     }
  41.  
  42.    PUTSTR ( V, s[style,4],
  43.                End_Col, End_Row, Attribute);                 { LR Corner  }
  44.  
  45.    PUTSTR ( V, COPIES( s[style,1],Ver_Adj),
  46.                End_Col, Start_Row + 1, Attribute);           { Right Side }
  47.  
  48.    PUTSTR ( V, s[style,5],
  49.                End_Col, Start_Row, Attribute);               { UR Corner  }
  50.  
  51.    PUTSTR ( H, COPIES( s[style,3],Hor_Adj),
  52.                Start_Col + 1, Start_Row, Attribute);         { Top        }
  53.  
  54. end;